<nz-form-item>
  <nz-form-label *ngIf="labelWidth!=0" [nzSpan]="labelWidth" [nzRequired]="required"
                 nzNoColon="true">{{name}}</nz-form-label>
  <nz-form-control [nzSpan]="inputWidth" style="text-align: left;left: -3px;
    padding-right: 6px;" class="dhl-date-control" #inputControl>
    <nz-date-picker *ngIf="type=='' || type=='date'"
                    [(ngModel)]="value"
                    [nzDisabledDate]="disabledDates"
                    (ngModelChange)="onChange($event)"
                    [nzFormat]="dateFormat"
                    [nzDisabled]="disabled"
                    [nzShowTime]="showTime"
                    [nzAllowClear]="allowClear"
                    (nzOnOpenChange)="openClose()"
                    nzPlaceHolder=""
    ></nz-date-picker>

    <nz-range-picker *ngIf="type=='range'"
                     [(ngModel)]="value"
                     [nzDisabledDate]="disabledDates"
                     [nzDisabled]="disabled"
                     [nzFormat]="dateFormat"
                     (ngModelChange)="rangeOnChange($event)"
                     [nzShowTime]="showTime"
                     [nzAllowClear]="allowClear"
    ></nz-range-picker>

    <nz-month-picker
      *ngIf="type == 'month'"
      [(ngModel)]="value"
      [nzDisabled]="disabled"
      [nzAllowClear]="allowClear"
      [nzFormat]="'yyyy/MM'"
      (ngModelChange)="onChange($event)"
      nzPlaceHolder=""
    ></nz-month-picker>

    <nz-week-picker
      *ngIf="type == 'week'"
      [(ngModel)]="value"
      [nzDisabled]="disabled"
      [nzAllowClear]="allowClear"
      (ngModelChange)="onChange($event)"
      nzPlaceHolder=""
    ></nz-week-picker>

    <nz-year-picker
      *ngIf="type == 'year'"
      [(ngModel)]="value"
      [nzDisabled]="disabled"
      [nzAllowClear]="allowClear"
      [nzFormat]="'yyyy'"
      (ngModelChange)="onChange($event)"
      nzPlaceHolder=""
    ></nz-year-picker>
    <input dhl-input-element hidden [value]="inputValue"/>
    <button class="reset-button" hidden (click)="reset()"></button>
  </nz-form-control>
</nz-form-item>
